 {include file="header.html"}
 <script type="text/javascript">
 $(function(){ 
	    $('#article_form').validate({
	        errorPlacement: function(error, element){
	            $(element).next('.field_notice').hide();
	            $(element).after(error);
	        },
	        success       : function(label){
	            label.addClass('right').text('OK!');
	        },
	        rules : {    
	            
	        	name :{
	        	  accept  : 'mp4|pdf'
	          },
	       
	          sort_order:{
	            	 required : true,
	                 number   : true
	             },   
	           pic : {
	                 accept  : 'gif|png|jpe?g'
	             }
     
	        },
	        messages : {
	        	name:{
	        		accept : '不支持的格式'
	            },
	         	            
	            sort_order : {
	                required : '排序不能为空',
	                number   : '必选为数字'
	            },
	            pic : {
	                accept : '{$lang.limit_img}'
	            },
	            
	            
	        }
	    });
	});
 </script>
 <div class="info">
    <form method="post" enctype="multipart/form-data" id="article_form">
       
        <table class="infoTable"> 
        
         {if $file.path}
          <tr>
                <th class="paddingT15">  文件名:</th>
                <td class="paddingT15 wordSpacing5">{$file.name}</td>
            </tr>
        
            <tr>
                <th class="paddingT15">  文件大小:</th>
                <td class="paddingT15 wordSpacing5">{$file.size}Kb</td>
            </tr>
            
            <tr>
                <th class="paddingT15">   文件类型:</th>
                <td class="paddingT15 wordSpacing5">{$file.type}</td>
            </tr>
            
             <tr>
                <th class="paddingT15">  封面:</th>
                <td class="paddingT15 wordSpacing5">
               {if $file.pic}                
               <a href="{$file.pic}" target="_blank"><img  src='{$file.pic}' height="100"/></a>
               {/if}
 
         </td>
            </tr>
        
             {/if}
         <tr>  
           <th class="paddingT15">附件</th>
                <td><input class="infoTableFile2" id="name" type="file" name="name" /><label class="field_notice">支持格式mp4,pdf</label>
                {if $file.path}                
               <a href="{$file.path}" target="_blank">查看附件</a>{/if}
                </td>
            </tr>


               <tr>
                <th class="paddingT15">上传封面:</th>
                <td class="paddingT15 wordSpacing5">
                {if $activity.pic}
                 <a href="/{$file.pic}" target="_blank"><img src="/{$file.pic}" class="makesmall" max_width="120" max_height="90" /></a>
                {/if}
                    <input class="infoTableFile2" id="pic" type="file" name="pic" />
                    <label class="field_notice">{$lang.limit_img}</label>
                </td>
            </tr>
           <tr>
                <th class="paddingT15">  是否翻转:</th>
                <td class="paddingT15 wordSpacing5">
                <input type="checkbox" name="turn" value="1"/>  
                <label class="field_notice">选中时,PDF文件将翻转90°</label>
             </td>
            </tr>
  

              <tr>
                <th class="paddingT15"> 排序:</th>
                <td class="paddingT15 wordSpacing5">                    
                    <input class="sort_order" id="sort_order" type="text" name="sort_order" value="{$file.sort_order}" />                   
                     <label class="field_notice"></label>
                </td>
            </tr>
 {if $file.add_time}
            <tr>
                <th class="paddingT15"> 添加时间:</th>
                <td class="paddingT15 wordSpacing5">   
                     {$file.add_time}
                </td>
            </tr>
{/if}
               <tr>
            <th></th>
            <td class="ptb20">
                <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
            </td>
        </tr>
             </table></form></div>
             
             
             
 